﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;

using GDModel.Model.Map;
using GDBLL.Map;

namespace Web
{
    public partial class map : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //无法序列化类型 GDModel.Model.Map.Room[,] 的对象。不支持多维数组。
            //IDictionary
            //Room r = new Room(11, "山谷矿区");
            //r.Grid = new int[][] { new int[] { 1, 2, 3 }, new int[] { 11, 12, 31 }, new int[] { 21, 22, 23 } };
            //r.Props = "1:3,3:4,5:4";

            //Room r2 = new Room(12, "山谷矿区2");
            //r2.Grid = new int[][] { new int[] { 1, 2, 3 }, new int[] { 11, 12, 31 }, new int[] { 21, 22, 23 } };
            //r2.Props = "1:3,3:4,5:4";

            //Room r3 = new Room(13, "山谷矿区3");
            //r3.Grid = new int[][] { new int[] { 1, 2, 3 }, new int[] { 11, 12, 31 }, new int[] { 21, 22, 23 } };
            //r3.Props = "1:3,3:4,5:4";

            //Room r4 = new Room(14, "山谷矿区4");
            //r4.Grid = new int[][] { new int[] { 1, 2, 3 }, new int[] { 11, 12, 31 }, new int[] { 21, 22, 23 } };
            //r4.Props = "1:3,3:4,5:4";

            //Map m = new Map(111, "山谷矿区");
            ////Dictionary<int, string> dic = new Dictionary<int, string>();
            ////dic.Add(1, "aaa");
            ////dic.Add(2, "bbb");
            ////dic.Add(3, "ccc");

            //string dic = "1:aaa,2:bbb,3:ccc";
            //m.Formula = dic;
            //m.Props = "3:f,5:d,7:g";
            //m.Rooms = new Room[][] { new Room[] { r, r2 }, new Room[] { r3, r4 } };

            //MapBLL.SaveMap(m);

            //MapBLL.SaveMap2(m);


            //Map mp = MapBLL.LoadMap2();

            //Response.Write(mp!=null);


        }
    }
}
